package com.educhains.module.activity.persist.dao.impl;

import com.educhains.module.activity.persist.dao.ActivityReplyDAO;
import com.educhains.module.activity.persist.mybatis.ActivityReplyMapper;
import com.educhains.module.activity.persist.mybatis.InfloorActivityMapper;
import com.educhains.module.activity.vo.mb_model.ActivityReply;
import com.educhains.module.activity.vo.mb_model.InfloorActivity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public class ActicityReplyDAOImpl implements ActivityReplyDAO {

    @Autowired
    private ActivityReplyMapper activityReplyMapper;

    @Autowired
    private InfloorActivityMapper infloorActivityMapper;

    public List<ActivityReply> selectActivityReplyList(String activityId) {
        return activityReplyMapper.selectActivityReplyList(activityId);
    }

    public int createActivityReply(ActivityReply activityReply) {
        return activityReplyMapper.insertSelective(activityReply);
    }

    public int selectActivityReplyCount(String activityId) {
        return activityReplyMapper.selectActivityReplyCount(activityId);
    }

    public List<ActivityReply> selectActivityTargetReplyList(String activityReplyId) {
        return activityReplyMapper.selectActivityTargetReplyList(activityReplyId);
    }

    public List<InfloorActivity> selectInfloorByFloorId(String floorId) {
        return infloorActivityMapper.selectInfloorByFloorId(floorId);
    }
}
